<template>
  <div class="box" v-transition>
    <Title :place="place" :icon="icon" @handleTitleClick="handleTitleClick" :title="title"></Title>
    <div>
      <RechargePage :dataText="newStr" :height="height" @jumpMap="jumpMap"></RechargePage>
    </div>
  </div>
</template>
<script>
import common from "../common/index";
import Title from "../layout/Title";
import RechargePage from "../layout/Recharge";
export default {
  name: "Recharge",
  components: {
    Title,
    RechargePage
  },
  data() {
    return {
      title: this.Lang[this.$store.state.lang].recharge_t1,
      place: "left",
      icon: "fanhui",
      height:
        (document.documentElement.clientHeight || document.body.clientHeight) -
        40 +
        "px",
      newStr:
        "zegopay=" +
        common.compileStr(
          JSON.stringify({
            fuid: this.$store.state.userInfo.fuid,
            type: "recharge",
            timeStamp: new Date().getTime(),
            isCr: this.$store.state.userInfo.isCreditRecharge
          })
        )
    };
  },
  methods: {
    handleTitleClick() {
      this.$router.go(-1);
    },
    jumpMap() {
      this.$router.push({
        path: "/agentMap"
      });
    }
  },
  mounted() {
    // alert(this.newStr)
    
  }
};
</script>
<style  scoped>
.box {
  width: 100%;
}
</style>